const app = getApp()

Component({
    options: {
        addGlobalClass: true //采用全局样式
    },
    data: {
        // color: "#7A7E83",
        selected: 0,
        vip: false,
    },
    attached() {
        this.setData({
            vip: app.globalData.vip
        })
    },
    methods: {
        switchTab(e) {
            this.setData({
                selected: e.currentTarget.dataset.index
            })
            wx.switchTab({
                url: e.currentTarget.dataset.path
            });
        },
    }
})